.class Lcom/instagram/android/widget/c;
.super Landroid/webkit/WebViewClient;
.source "EnhancedWebView.java"


# instance fields
.field final synthetic a:Lcom/instagram/android/widget/a;

.field private b:Ljava/lang/String;

.field private c:Z


# direct methods
.method private constructor <init>(Lcom/instagram/android/widget/a;)V
    .locals 0
    .parameter

    .prologue
    .line 156
    iput-object p1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/instagram/android/widget/a;Lcom/instagram/android/widget/b;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 156
    invoke-direct {p0, p1}, Lcom/instagram/android/widget/c;-><init>(Lcom/instagram/android/widget/a;)V

    return-void
.end method

.method private a(Landroid/net/Uri;)V
    .locals 2
    .parameter

    .prologue
    .line 286
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/Fragment;->r()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 287
    const-string v0, "name"

    invoke-virtual {p1, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 288
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v1}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v1

    invoke-virtual {v1}, Landroid/support/v4/app/Fragment;->m()Landroid/support/v4/app/r;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/instagram/android/util/v;->d(Landroid/support/v4/app/r;Ljava/lang/String;)Lcom/instagram/e/b/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/e/b/a/a;->e()V

    .line 290
    :cond_0
    return-void
.end method

.method private b(Landroid/net/Uri;)V
    .locals 4
    .parameter

    .prologue
    .line 293
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/Fragment;->r()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 294
    const-string v0, "id"

    invoke-virtual {p1, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 296
    const/4 v0, 0x0

    .line 297
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v1}, Lcom/instagram/android/widget/a;->a(Lcom/instagram/android/widget/a;)Ljava/util/HashSet;

    move-result-object v1

    invoke-virtual {v1, v2}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    .line 298
    const/4 v0, 0x1

    .line 299
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v1}, Lcom/instagram/android/widget/a;->a(Lcom/instagram/android/widget/a;)Ljava/util/HashSet;

    move-result-object v1

    invoke-virtual {v1, v2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z

    .line 302
    :cond_0
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v1}, Lcom/instagram/android/widget/a;->d(Lcom/instagram/android/widget/a;)Ljava/lang/Integer;

    move-result-object v1

    sget-object v3, Lcom/instagram/android/fragment/en;->b:Ljava/lang/Integer;

    invoke-virtual {v1, v3}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    const-string v1, "news_post"

    .line 304
    :goto_0
    iget-object v3, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v3}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v3

    invoke-virtual {v3}, Landroid/support/v4/app/Fragment;->m()Landroid/support/v4/app/r;

    move-result-object v3

    invoke-static {v3, v2, v0}, Lcom/instagram/android/util/v;->a(Landroid/support/v4/app/r;Ljava/lang/String;Z)Lcom/instagram/e/b/a/a;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/instagram/e/b/a/a;->e(Ljava/lang/String;)Lcom/instagram/e/b/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/e/b/a/a;->e()V

    .line 308
    :cond_1
    return-void

    .line 302
    :cond_2
    const-string v1, "following_post"

    goto :goto_0
.end method

.method private c(Landroid/net/Uri;)V
    .locals 4
    .parameter

    .prologue
    .line 311
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/Fragment;->r()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 312
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    .line 314
    const-string v0, "username"

    invoke-virtual {p1, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 315
    const-string v2, "id"

    invoke-virtual {p1, v2}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 316
    if-eqz v2, :cond_1

    .line 317
    const-string v0, "UserDetailFragment.EXTRA_USER_ID"

    invoke-virtual {v1, v0, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 322
    :goto_0
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->d(Lcom/instagram/android/widget/a;)Ljava/lang/Integer;

    move-result-object v0

    sget-object v2, Lcom/instagram/android/fragment/en;->b:Ljava/lang/Integer;

    invoke-virtual {v0, v2}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    const-string v0, "news_user"

    .line 324
    :goto_1
    new-instance v2, Lcom/instagram/e/b/a/a;

    iget-object v3, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v3}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v3

    invoke-virtual {v3}, Landroid/support/v4/app/Fragment;->m()Landroid/support/v4/app/r;

    move-result-object v3

    invoke-direct {v2, v3}, Lcom/instagram/e/b/a/a;-><init>(Landroid/support/v4/app/r;)V

    new-instance v3, Lcom/instagram/android/fragment/gs;

    invoke-direct {v3}, Lcom/instagram/android/fragment/gs;-><init>()V

    invoke-virtual {v2, v3, v1}, Lcom/instagram/e/b/a/a;->a(Landroid/support/v4/app/Fragment;Landroid/os/Bundle;)Lcom/instagram/e/b/a/a;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/instagram/e/b/a/a;->e(Ljava/lang/String;)Lcom/instagram/e/b/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/e/b/a/a;->e()V

    .line 329
    :cond_0
    return-void

    .line 319
    :cond_1
    const-string v2, "UserDetailFragment.EXTRA_USER_NAME"

    invoke-virtual {v1, v2, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 322
    :cond_2
    const-string v0, "following_user"

    goto :goto_1
.end method

.method private d(Landroid/net/Uri;)V
    .locals 2
    .parameter

    .prologue
    .line 332
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/Fragment;->r()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 333
    const-string v0, "user_id"

    invoke-virtual {p1, v0}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 334
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v1}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v1

    invoke-virtual {v1}, Landroid/support/v4/app/Fragment;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/instagram/android/maps/f/a;->a(Landroid/app/Activity;Ljava/lang/String;)V

    .line 336
    :cond_0
    return-void
.end method

.method private e(Landroid/net/Uri;)V
    .locals 7
    .parameter

    .prologue
    .line 339
    const-string v0, "EnhancedWebView"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Received toast: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 347
    :try_start_0
    invoke-static {}, Lcom/instagram/android/service/f;->a()Lcom/instagram/android/service/f;

    move-result-object v0

    .line 348
    const-string v1, "counts"

    invoke-virtual {p1, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/android/service/f;->readTree(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 355
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-virtual {v1}, Lcom/instagram/android/widget/a;->isShown()Z

    move-result v1

    if-nez v1, :cond_1

    .line 356
    const-string v1, "likes"

    invoke-virtual {v0, v1}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v1

    invoke-virtual {v1}, Lcom/fasterxml/jackson/databind/JsonNode;->asInt()I

    move-result v1

    .line 357
    const-string v2, "comments"

    invoke-virtual {v0, v2}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v2

    invoke-virtual {v2}, Lcom/fasterxml/jackson/databind/JsonNode;->asInt()I

    move-result v2

    .line 358
    const-string v3, "relationships"

    invoke-virtual {v0, v3}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v3

    invoke-virtual {v3}, Lcom/fasterxml/jackson/databind/JsonNode;->asInt()I

    move-result v3

    .line 359
    const-string v4, "usertags"

    invoke-virtual {v0, v4}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v4

    invoke-virtual {v4}, Lcom/fasterxml/jackson/databind/JsonNode;->asInt()I

    move-result v4

    .line 363
    add-int v5, v1, v2

    add-int/2addr v5, v3

    add-int/2addr v5, v4

    if-lez v5, :cond_0

    .line 364
    new-instance v5, Landroid/content/Intent;

    const-string v6, "MainTabActivity.BROADCAST_TOAST"

    invoke-direct {v5, v6}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 365
    const-string v6, "MainTabActivity.EXTRA_BROADCAST_TOAST_LIKES"

    invoke-virtual {v5, v6, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 366
    const-string v1, "MainTabActivity.EXTRA_BROADCAST_TOAST_COMMENTS"

    invoke-virtual {v5, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 367
    const-string v1, "MainTabActivity.EXTRA_BROADCAST_TOAST_RELATIONSHIPS"

    invoke-virtual {v5, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 368
    const-string v1, "MainTabActivity.EXTRA_BROADCAST_TOAST_USERTAGS"

    invoke-virtual {v5, v1, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 369
    invoke-static {v5}, Lcom/instagram/n/d;->a(Landroid/content/Intent;)Z

    .line 375
    :cond_0
    :goto_0
    const-string v1, "photos_of_you"

    invoke-virtual {v0, v1}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v0

    invoke-virtual {v0}, Lcom/fasterxml/jackson/databind/JsonNode;->asInt()I

    move-result v0

    .line 377
    new-instance v1, Landroid/content/Intent;

    const-string v2, "SelfFragment.BROADCAST_NEW_PHOTOS_OF_YOU"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 378
    const-string v2, "SelfFragment.EXTRA_BROADCAST_NEW_PHOTOS_OF_YOU_COUNT"

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 379
    invoke-static {v1}, Lcom/instagram/n/d;->a(Landroid/content/Intent;)Z

    .line 380
    :goto_1
    return-void

    .line 349
    :catch_0
    move-exception v0

    .line 350
    const-string v0, "EnhancedWebView"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Error parsing json from url: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1

    .line 372
    :cond_1
    const-string v1, "EnhancedWebView"

    const-string v2, "Webview is visible, not showing toast"

    invoke-static {v1, v2}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method


# virtual methods
.method public onLoadResource(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 3
    .parameter "view"
    .parameter "url"

    .prologue
    .line 222
    const-string v0, "EnhancedWebView"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Loading resource: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 227
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->c(Lcom/instagram/android/widget/a;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-virtual {p1}, Landroid/webkit/WebView;->getUrl()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0, p2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 228
    const/4 v0, 0x0

    invoke-virtual {p0, p1, p2, v0}, Lcom/instagram/android/widget/c;->onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    .line 236
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/widget/c;->b:Ljava/lang/String;

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    iget-boolean v0, p0, Lcom/instagram/android/widget/c;->c:Z

    if-nez v0, :cond_1

    const-string v0, "css"

    invoke-virtual {p2, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    const-string v0, "js"

    invoke-virtual {p2, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 238
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-virtual {v0}, Lcom/instagram/android/widget/a;->c()V

    .line 239
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/instagram/android/widget/c;->c:Z

    .line 241
    :cond_1
    return-void
.end method

.method public onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 3
    .parameter "view"
    .parameter "url"

    .prologue
    .line 184
    const-string v0, "EnhancedWebView"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Finished: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 185
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-virtual {v0}, Lcom/instagram/android/widget/a;->a()V

    .line 186
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->a(Lcom/instagram/android/widget/a;)Ljava/util/HashSet;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/HashSet;->clear()V

    .line 187
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/instagram/android/widget/a;->a(Lcom/instagram/android/widget/a;Z)Z

    .line 191
    iget-boolean v0, p0, Lcom/instagram/android/widget/c;->c:Z

    if-nez v0, :cond_0

    .line 192
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-virtual {v0}, Lcom/instagram/android/widget/a;->c()V

    .line 195
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->b(Lcom/instagram/android/widget/a;)Lcom/instagram/android/widget/d;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 196
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->b(Lcom/instagram/android/widget/a;)Lcom/instagram/android/widget/d;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    iget-object v2, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v2}, Lcom/instagram/android/widget/a;->c(Lcom/instagram/android/widget/a;)Z

    move-result v2

    invoke-interface {v0, v1, v2}, Lcom/instagram/android/widget/d;->a(Lcom/instagram/android/widget/a;Z)V

    .line 198
    :cond_1
    return-void
.end method

.method public onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .locals 3
    .parameter "view"
    .parameter "url"
    .parameter "favicon"

    .prologue
    .line 202
    const-string v0, "EnhancedWebView"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Loading: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 204
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/instagram/android/widget/a;->a(Lcom/instagram/android/widget/a;Z)Z

    .line 205
    iput-object p2, p0, Lcom/instagram/android/widget/c;->b:Ljava/lang/String;

    .line 206
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/instagram/android/widget/c;->c:Z

    .line 209
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->d(Lcom/instagram/android/widget/a;)Ljava/lang/Integer;

    move-result-object v0

    sget-object v1, Lcom/instagram/android/fragment/en;->b:Ljava/lang/Integer;

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 210
    invoke-static {}, Lcom/instagram/android/activity/NewsActivityInTab;->o()Z

    .line 213
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->b(Lcom/instagram/android/widget/a;)Lcom/instagram/android/widget/d;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 214
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->b(Lcom/instagram/android/widget/a;)Lcom/instagram/android/widget/d;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    iget-object v2, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v2}, Lcom/instagram/android/widget/a;->c(Lcom/instagram/android/widget/a;)Z

    move-result v2

    invoke-interface {v0, v1, v2}, Lcom/instagram/android/widget/d;->a(Lcom/instagram/android/widget/a;Z)V

    .line 217
    :cond_1
    invoke-super {p0, p1, p2, p3}, Landroid/webkit/WebViewClient;->onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    .line 218
    return-void
.end method

.method public onReceivedError(Landroid/webkit/WebView;ILjava/lang/String;Ljava/lang/String;)V
    .locals 3
    .parameter "view"
    .parameter "errorCode"
    .parameter "description"
    .parameter "failingUrl"

    .prologue
    .line 166
    const/16 v0, 0x1f7

    if-eq p2, v0, :cond_0

    .line 168
    :try_start_0
    invoke-virtual {p1}, Landroid/webkit/WebView;->stopLoading()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 172
    :goto_0
    :try_start_1
    invoke-virtual {p1}, Landroid/webkit/WebView;->clearView()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 175
    :goto_1
    const-string v0, ""

    .line 176
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "<html>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "</html>"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/net/Uri;->encode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "text/html"

    const-string v2, "UTF-8"

    invoke-virtual {p1, v0, v1, v2}, Landroid/webkit/WebView;->loadData(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 177
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-virtual {v0}, Lcom/instagram/android/widget/a;->getContext()Landroid/content/Context;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->could_not_refresh_feed:I

    const/4 v2, 0x1

    invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 179
    :cond_0
    invoke-super {p0, p1, p2, p3, p4}, Landroid/webkit/WebViewClient;->onReceivedError(Landroid/webkit/WebView;ILjava/lang/String;Ljava/lang/String;)V

    .line 180
    return-void

    .line 169
    :catch_0
    move-exception v0

    goto :goto_0

    .line 173
    :catch_1
    move-exception v0

    goto :goto_1
.end method

.method public shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 4
    .parameter "view"
    .parameter "url"

    .prologue
    .line 245
    invoke-static {p2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    .line 246
    invoke-virtual {v0}, Landroid/net/Uri;->getHost()Ljava/lang/String;

    move-result-object v1

    .line 248
    invoke-virtual {v0}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v2

    const-string v3, "instagram"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_9

    .line 249
    const-string v2, "media"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 250
    invoke-direct {p0, v0}, Lcom/instagram/android/widget/c;->b(Landroid/net/Uri;)V

    .line 282
    :cond_0
    :goto_0
    const/4 v0, 0x1

    return v0

    .line 251
    :cond_1
    const-string v2, "user"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 252
    invoke-direct {p0, v0}, Lcom/instagram/android/widget/c;->c(Landroid/net/Uri;)V

    goto :goto_0

    .line 253
    :cond_2
    const-string v2, "photomap"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_3

    const-string v2, "photomap_review"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_4

    .line 254
    :cond_3
    invoke-direct {p0, v0}, Lcom/instagram/android/widget/c;->d(Landroid/net/Uri;)V

    goto :goto_0

    .line 255
    :cond_4
    const-string v2, "toast"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_5

    .line 256
    invoke-direct {p0, v0}, Lcom/instagram/android/widget/c;->e(Landroid/net/Uri;)V

    goto :goto_0

    .line 257
    :cond_5
    const-string v2, "tag"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_6

    .line 258
    invoke-direct {p0, v0}, Lcom/instagram/android/widget/c;->a(Landroid/net/Uri;)V

    goto :goto_0

    .line 259
    :cond_6
    const-string v2, "browser"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_7

    .line 260
    const-string v1, "url"

    invoke-virtual {v0, v1}, Landroid/net/Uri;->getQueryParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 261
    invoke-static {v0}, Lcom/instagram/android/f/a;->a(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 262
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/instagram/android/widget/a;->a(Lcom/instagram/android/widget/a;Landroid/net/Uri;)V

    goto :goto_0

    .line 264
    :cond_7
    const-string v0, "starredmodal"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_8

    .line 265
    iget-object v0, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v0}, Lcom/instagram/android/widget/a;->e(Lcom/instagram/android/widget/a;)V

    goto :goto_0

    .line 266
    :cond_8
    const-string v0, "find_friends"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 267
    new-instance v0, Lcom/instagram/e/b/a/a;

    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v1}, Lcom/instagram/android/widget/a;->f(Lcom/instagram/android/widget/a;)Landroid/support/v4/app/Fragment;

    move-result-object v1

    invoke-virtual {v1}, Landroid/support/v4/app/Fragment;->m()Landroid/support/v4/app/r;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/instagram/e/b/a/a;-><init>(Landroid/support/v4/app/r;)V

    new-instance v1, Lcom/instagram/android/fragment/cq;

    invoke-direct {v1}, Lcom/instagram/android/fragment/cq;-><init>()V

    invoke-virtual {v0, v1}, Lcom/instagram/e/b/a/a;->a(Landroid/support/v4/app/Fragment;)Lcom/instagram/e/b/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/e/b/a/a;->e()V

    goto/16 :goto_0

    .line 271
    :cond_9
    const-string v1, "EnhancedWebView"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Unknown URL received, sending intent: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 274
    invoke-static {p2}, Lcom/instagram/android/f/a;->a(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 275
    iget-object v1, p0, Lcom/instagram/android/widget/c;->a:Lcom/instagram/android/widget/a;

    invoke-static {v1, v0}, Lcom/instagram/android/widget/a;->a(Lcom/instagram/android/widget/a;Landroid/net/Uri;)V

    goto/16 :goto_0
.end method
